<!--
 * @Description: 
 * @Version: 1.0
 * @Autor: younghxp
 * @Date: 2022-03-17 13:43:06
 * @LastEditors: younghxp
 * @LastEditTime: 2022-03-18 17:09:29
-->
<template>
  <div>
    <topTitle
      titleText="历史记录"
      :back="true"
      @gobackTriser="goBack"
    ></topTitle>
    <projectEmployeeList
      :showHistory="false"
      :projectId="projectId"
      :projectName="projectName"
      :currentPage="currentPage"
      ref="employeeList"
      :fromType="fromType"
      :isFB="isFB"
    ></projectEmployeeList>
  </div>
</template>

<script>
import projectEmployeeList from './projectEmployeeList'
export default {
  name: 'projectEmployeeListPage',
  components: {
    projectEmployeeList,
  },
  data() {
    return {
      projectId: '',
      projectName: '',
      currentPage: '',
      fromType: '',
      isFB: '',
    }
  },
  created() {
    const { projectId, projectName, currentPage, fromType, isFB } =
      this.$route.query
    this.projectId = projectId
    this.projectName = projectName
    this.currentPage = currentPage
    this.fromType = fromType
    this.isFB = isFB === 'true' ? true : false
  },
  methods: {
    goBack() {
      const { oldUrl, backPath, projectId } = this.$route.query
      this.$router.push({
        path: backPath,
        query: {
          projectId,
        },
      })
      this.$store.commit('GOBACK_NAME', {
        oldUrl,
        newUrl: this.$router.currentRoute.fullPath,
      })
    },
  },
}
</script>

<style></style>
